package com.example.peibei.app;

import android.content.Context;

import com.dingtao.common.core.WDApplication;
import com.example.peibei.R;
import com.scwang.smartrefresh.layout.SmartRefreshLayout;
import com.scwang.smartrefresh.layout.api.DefaultRefreshHeaderCreator;
import com.scwang.smartrefresh.layout.api.RefreshHeader;
import com.scwang.smartrefresh.layout.api.RefreshLayout;
import com.scwang.smartrefresh.layout.header.ClassicsHeader;
import com.tencent.qcloud.tuicore.TUILogin;

import cn.jpush.android.api.JPushInterface;

public class MyApplication extends WDApplication {
    @Override
    public void onCreate() {
        super.onCreate();
        JPushInterface.init(this);
        TUILogin.init(this, 1400572052, null, null);//初始化im

        SmartRefreshLayout.setDefaultRefreshHeaderCreator(new DefaultRefreshHeaderCreator() {
            @Override
            public RefreshHeader createRefreshHeader(Context context, RefreshLayout layout) {
                layout.setPrimaryColorsId(R.color.color_fffafafa, R.color.color_ff00000);//全局设置主题颜色
                ClassicsHeader classicsHeader = new ClassicsHeader(context);
                return classicsHeader;////指定为经典Header，默认是 贝塞尔雷达Header
            }
        });
    }
}
